Computing systems typically include a processor and a memory associated with the processor. Often, the computing systems are electrically connected to external devices, such as disk drives, scanners, or monitors. The computing system usually includes a software program containing numerous commands. The processor executes the commands from the software program. In some applications, the software program uses programmed input/output (PIO) instructions via the processor to communicate with the external devices. The software program issues a first PIO instruction to the processor to communicate with a first external device. PIO instructions are typically characterized as synchronous. By the term "synchronous," it is meant that the processor does not proceed to a second PIO instruction issued by the software program until the first PIO instruction has been completed and an associated completion status signal is transmitted to the processor that issued the first PIO instruction.
In some applications, the use of PIO instructions is advantageous because the software program receives immediate feedback of whether the desired operation with the external device was completed successfully; however, PIO instructions have disadvantages. One such disadvantage is that PIO instructions often result in degraded processor performance because the total length of time it takes to deliver, execute, and transmit a completion status signal for the overall operation is time consuming. This performance degradation increases as the processor speed increases and as the external devices are placed in physical enclosures that are located remotely from the system processor.
Another method used by software programs to communicate with external devices is by issuing memory mapped input/output (MMIO) instructions. As MMIO instruction is an instruction that the processor uses to access the main memory. The processor typically does not distinguish between MMIO instructions to external devices and MMIO instructions to main memory. MMIO instructions are asynchronous. By the term "asynchronous," it is meant that the processor executes a second sequential MMIO instruction without waiting for an associated completion status signal from the external device being delivered back to the system processor for the first MMIO instruction. Thus, where data flows only from the processor to the external device, the processor does not wait for a return completion status signal, and communication with the external device does not have a negative impact on the processor's performance.
MMIO instructions also have disadvantages. One disadvantage of MMIO instructions is that the software program does not receive feedback on the status of the operation from the external device. This may lead to unrecoverable errors or undetected data loss. To overcome this disadvantage, in some applications, the completion status of an MMIO instruction is determined by reading a status register in an input/output bus controller or in the external device itself. Reading a status register in the input/output bus controller or in the external device also comes with problems. The processor must wait for the read operation to complete and must typically wait for the completion of previous MMIO instructions. Thus, the processor typically stops execution of subsequent MMIO instructions until the read operation and the previous MMIO instruction are completed. Thus, reading a status register negates the advantage of MMIO instructions and degrades processor performance similar to PIO instructions.
Therefore, improvements in the execution of input/output instructions are desirable.